package com.example.rjb_shoping.service.impl;

import com.example.rjb_shoping.entity.RjbOrderStatus;
import com.example.rjb_shoping.dao.RjbOrderStatusDao;
import com.example.rjb_shoping.service.RjbOrderStatusService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (RjbOrderStatus)表服务实现类
 *
 * @author makejava
 * @since 2021-06-09 20:43:11
 */
@Service("rjbOrderStatusService")
public class RjbOrderStatusServiceImpl implements RjbOrderStatusService {
    @Resource
    private RjbOrderStatusDao rjbOrderStatusDao;


    @Override
    public RjbOrderStatus queryById(Integer oId) {
        return this.rjbOrderStatusDao.queryById(oId);
    }

    @Override
    public List<RjbOrderStatus> queryAllByLimit(int offset, int limit) {
        return this.rjbOrderStatusDao.queryAllByLimit(offset, limit);
    }

    @Override
    public RjbOrderStatus insert(RjbOrderStatus rjbOrderStatus) {
        this.rjbOrderStatusDao.insert(rjbOrderStatus);
        return rjbOrderStatus;
    }

    @Override
    public RjbOrderStatus update(RjbOrderStatus rjbOrderStatus) {
        this.rjbOrderStatusDao.update(rjbOrderStatus);
        return this.queryById(rjbOrderStatus.getOId());
    }

    @Override
    public boolean deleteById(Integer oId) {
        return this.rjbOrderStatusDao.deleteById(oId) > 0;
    }
}
